# This script builds mint.prg based on version 1.08 of MiNT.
# You should set up a separate folder to run this version of MacMiNT.
# This folder should have JET, mint.prg, mint.cnf, and
# any external filesystems that you use.  The mint.cnf should be
# nearly identical to the mint.cnf for the older mint (0.95).  The
# two versions can share everything except the files mentioned above.
#
# This script assumes that minimal.sh, normal.sh, and develop.sh have
# been run successfully.
#
# These files need to be in your $SAVE directory:
#
# (MacMiNT Archive)
# mcmnt108.tar.gz
# byacc.tar.gz
#
# (ftp.germany.eu.net)
# /pub/comp/atari-st/mint/gdb36p4b.zoo
#
# (Atari Archive)
# Mint/mint108s.zoo

# check for everything
for i in mint108s.zoo mcmnt108.tar.gz byacc.tar.gz gdb36p4b.zoo; do
	if [ ! -r $SAVE/$i ] ; then
		echo "can't find $SAVE/$i"
		exit 1
	fi
done

mkdir /src/mcmnt108

echo mint 1.08
cd /src/mcmnt108
zoo xq $SAVE/mint108s.zoo
rm -r purec
crlf -u *

echo macmint diffs
cd /src
gzip -d < $SAVE/mcmnt108.tar.gz | tar xf -
cd /src/mcmnt108
patch < diffs.108

echo byacc
cd /usr/bin
gzip -d < $SAVE/byacc.tar.gz | tar xf - byacc/byacc.ttp
mv byacc/byacc.ttp .
rmdir byacc
cd /usr/lib
gzip -d < $SAVE/byacc.tar.gz | tar xf - byacc/libby.olb
mv byacc/libby.olb by.olb
rmdir byacc

echo gdb
cd /usr/bin
zoo xq: $SAVE/gdb36p4b.zoo gdb.ttp

echo build mcmnt108
cd /src/mcmnt108
make
